# -*- coding: utf-8 -*-
#
# Author:: Jonny
# Date:: 2022/7/5
from time import sleep

from lib.adb_ import click_by_image
from obj import obj_info
from submodules.common.lib.datetime_ import get_timestamp
from submodules.common.lib.log_ import get_logger

logger = get_logger()
while True:
    # 定时关闭
    # hour_str = get_timestamp()[8:12]
    # if hour_str == "0729":
    #     logger.info("停止运行")
    #     exit(0)

    click_by_image(obj_info.主页面__集市弹窗_收藏_默认__第一件物品, obj_info.主页面__集市弹窗_收藏_默认__刷新按钮)
    # 抢购宠物等非装备容错
    click_by_image(obj_info.主页面__集市弹窗_收藏_默认__抢购按钮)
    click_by_image(obj_info.主页面__集市弹窗_收藏_默认__抢购按钮)
    click_by_image(obj_info.主页面__集市弹窗_抢购中弹窗__开始抢购按钮)
    click_by_image(obj_info.主页面__集市弹窗_抢购中弹窗__关闭按钮)
    click_by_image(obj_info.主页面__集市弹窗_收藏_默认__刷新按钮)
    click_by_image(obj_info.主页面__集市弹窗_中断抢购确认弹窗__关闭按钮)
